package com.yuan.model_community.service;

import com.yuan.model_common.dto.CommonQueryCriteria;
import com.yuan.model_community.domain.CommunityBuilding;
import com.yuan.model_community.service.dto.CommunityBuildingDto;
import me.zhengjie.utils.PageResult;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface CommunityBuildingService {

    PageResult<CommunityBuildingDto> queryAll(CommonQueryCriteria criteria, Pageable pageable);

    List<CommunityBuildingDto> queryAll();

    List<CommunityBuildingDto> queryAll(CommonQueryCriteria criteria);

    void download(List<CommunityBuildingDto> queryAll, HttpServletResponse response) throws IOException;

    @Transactional(rollbackFor = Exception.class)
    void create(CommunityBuilding resources);

    @Transactional(rollbackFor = Exception.class)
    void update(CommunityBuilding resources) throws Exception;

    @Transactional(rollbackFor = Exception.class)
    void delete(Integer ids);
}
